home *** CD-ROM | disk | FTP | other *** search
- <!-------------------------------------------------------------------------------------------------
- Copyright by Kofax Image Products
- -------------------------------------------------------------------------------------------------->
-
-
- <%@ LANGUAGE = VBScript %>
- <%
-
- Response.Expires = 60
- Response.Expiresabsolute = Now() - 1
- Response.AddHeader "pragma","no-cache"
- Response.AddHeader "cache-control","private"
- Response.CacheControl = "no-cache"
- if Application("PubTypesPath")="" then
- Dim Vroot,iCount,idx
- Vroot = Server.MapPath("Default.asp")
- iCount = 0
- idx = InStrRev(Vroot, "\")
- if (idx > 0) and (idx < len(Vroot)) then
- Vroot = Left(Vroot,idx-1)
- end if
- Application("PubTypesPath")=Vroot & "\PubTypes"
- Application("XMLDirectory")=Vroot & "\XMLBATCH"
- Application("SiteIDFile")=Vroot & "\siteid.txt"
- Application("LogFile")=Vroot & "\csweblog.txt"
- end if
-
-
- '---------------------------------------------------------------------------------------------------
- 'Getting local strings
- '--------------------------------------------------------------------------------------------------
-
- dim oConn,oRs,i,sFilePath,sLangTable
- dim display(5)
- on error resume next
- set oConn = Server.CreateObject("ADODB.Connection")
- sFilePath=Server.MapPath("csuiweb.mdb")
-
- oConn.Open("Driver={Microsoft Access Driver (*.mdb)};DBQ=" & sFilePath & ";")
- if err then
- set oConn=nothing
- err.clear
- Response.Redirect("Error.asp?Err=1")
- end if
- sLangTable=mid(Request.ServerVariables("HTTP_ACCEPT_LANGUAGE"),1,2)
- if trim("" & sLangTable)="" then
- sLangTable="En"
- end if
- Set oRs=oConn.Execute("SELECT * FROM " & sLangTable & " WHERE Id=0")
- if (err and (Err.Number=-2147217865)) then
- err.Clear
- sLangTable="En"
- Set oRs=oConn.Execute("SELECT * FROM " & sLangTable & " WHERE Id=0")
- end if
- Response.Write("<META HTTP-EQUIV='CONTENT-LANGUAGE' CONTENT='" & oRS("Value") & "'>")
- 'To begin, select a document type from below.
- Set oRs=oConn.Execute("SELECT * FROM " & sLangTable & " WHERE Id=4")
- display(0)=oRs("Value")
- 'Create
- Set oRs=oConn.Execute("SELECT * FROM " & sLangTable & " WHERE Id=6")
- display(1)=oRs("Value")
- 'Error on getting published data.
- Set oRs=oConn.Execute("SELECT * FROM " & sLangTable & " WHERE Id=30")
- display(2)=oRs("Value")
- 'Error on getting published data.ActiveX can not create component.
- Set oRs=oConn.Execute("SELECT * FROM " & sLangTable & " WHERE Id=37")
- display(3)=oRs("Value")
- 'Choose...
- Set oRs=oConn.Execute("SELECT * FROM " & sLangTable & " WHERE Id=5")
- display(4)=oRs("Value")
- 'Please select a document to begin...
- Set oRs=oConn.Execute("SELECT * FROM " & sLangTable & " WHERE Id=45")
- display(5)=oRs("Value")
-
- oRs.Close
- oConn.Close
- if err then
- err.clear
- Response.Redirect("Error.asp?Err=1")
- end if
- %>
- <html>
- <head>
- <link rel="stylesheet" href="coversheet.css">
-
- <script language="JavaScript">
- //All functions that will be used on client side are stored here
- //sending the change to body page and submitting it
- var iTimer;
- function SubmitChange()
- {
- var str;
- var i=document.frmDocument.sltDocument.selectedIndex;
- if (i==0)
- {
- try
- {
- alert(document.frmDocument.PleaseText.value);
- //Clearing body page
- str="<input type='Hidden' name='selecteddata' value=''>";
- top.body.StoreData.innerHTML=str;
- top.body.frmIndexField.target="_self";
- top.body.frmIndexField.action="UtilBody.asp";
- top.body.focus();
- top.body.frmIndexField.submit();
- top.dialogHeight="275px";
- }
- catch (e)
- {
- }
- }
- else
- {
- try
- {
- top.body.StoreData.innerHTML=str;
- top.body.frmIndexField.target="_self";
-
- //getting the change
- str=document.frmDocument.sltDocument.options(i).value;
- str="<input type='Hidden' name='selecteddata' value='" + str + "'>";
- top.dialogHeight="350px";
- if (document.frmDocument.FirstLoad.value=="True")
- {
- // top.dialogHeight=22;
- document.frmDocument.FirstLoad.value="False";
- }
- top.body.StoreData.innerHTML=str;
- top.body.frmIndexField.action="UtilBody.asp";
- top.body.frmIndexField.submit();
- }
- catch (e)
- {
- // window.goBack(0);
- }
- }
-
- }
-
- function init()
- {
- iTimer=window.setInterval("SetFocus()",50);
- }
-
- //setting focus to combox
- function SetFocus()
- {
- if (document.forms.length>0)
- {
- var nWidth=document.frmDocument.sltDocument.clientWidth +16;
- if (nWidth>280)
- {
- top.dialogWidth= nWidth + "px";
- }
- try
- {
- document.frmDocument.sltDocument.focus();
- window.clearInterval(iTimer);
- }
- catch (e)
- {
- // alert(e);
- }
- }
- else
- {
- window.clearInterval(iTimer);
- }
-
- }
-
- //opening and showing the about window
- function ShowAbout()
- {
- var oOpener = top.dialogArguments;
- oOpener.ShowAbout();
- }
- //opening and showing the about window
- function ShowHelp()
- {
- var oOpener = top.dialogArguments;
- oOpener.ShowHelp();
- }
-
- //changing images when events fighting
- function RollImage(obj,i,j)
- {
- if (i==1)
- {
- if (j==1)
- obj.src="images/support_p.jpg";
- else
- {
- if (j==2)
- obj.src="images/help_p.jpg";
- else
- obj.src="images/about_p.jpg";
- }
- }
- else
- {
- if (j==1)
- obj.src="images/support.jpg";
- else
- {
- if (j==2)
- obj.src="images/help.jpg";
- else
- obj.src="images/about.jpg";
- }
- }
-
- }
-
- </script>
-
- </head>
-
- <!--- <body bgcolor="#A1AED0" leftmargin="0" rightmargin="0" topmargin="0" bottommargin="0" onload="SetFocus();" onunload="UnloadAll();"> --->
- <body bgcolor="#A1AED0" leftmargin="0" rightmargin="0" topmargin="0" bottommargin="0" onload="init();" oncontextmenu="return false">
- <%
- dim oXML,nB,nD,nF
- on error resume next
- set oXML=CreateObject("RCXMLWEB.RCXMLUI")
- if err then
- %>
- <center>
- <table>
- <tr>
- <td class="errorMessage"><%=display(3)%></td>
- </tr>
- </table>
- </center>
- <%
- err.Clear
- Response.End
- end if
-
- ' i=oXML.SetInfo(Application("PubTypesPath"),sWebRoot)
- 'used for getting sample image file
- i=oXML.SetInfo(Application("PubTypesPath"))
- if i<0 then
- dim fso,f
- Set fso = CreateObject("Scripting.FileSystemObject")
- set f =fso.OpenTextFile(Application("LogFile"),8,true)
- f.WriteLine oXML.ErrMessage
- f.Close
- set fso=nothing
- end if
- %>
-
- <center>
- <table border="0" cellpadding="0" cellspacing="0" bgcolor="White" width="100%">
- <tr>
- <td align="center" valign="middle"><image src="images/logo1.jpg">
- </td>
- </tr>
- </table>
- <table width="100%" border="0" cellpadding="2" cellspacing="0">
- <tr>
- <td height="2"></td>
- </tr>
- <tr>
- <td align="right">
- <a href="#" onclick="ShowHelp();" ondrag="return false" > <img src="images/help.jpg" alt="Help" border="0" onmousedown='RollImage(this,1,2);' onmouseout='RollImage(this,2,2);' onmouseup='RollImage(this,2,2);'></a>
- <a href="#" onclick="ShowAbout();" ondrag="return false"> <img src="images/about.jpg" alt="About" border="0" onmousedown='RollImage(this,1,3);' onmouseout='RollImage(this,2,3);' onmouseup='RollImage(this,2,3);'></a>
- </td>
- </tr>
- </table>
- <table width="100%" border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td width="10"> </td>
- <td class="indexlabels"><%=display(0)%></font>
- </td>
- </tr>
- <tr>
- <td width="10"> </td>
- <td>
- <form action="UtilBody.asp" method="post" name="frmDocument">
- <select name="sltDocument" onchange="SubmitChange();" >
- <option value="0"><%=display(4)%></option>
- <%
- for nB=1 to oXML.Batches.Count
- for nD=1 to oXML.Batches(nB).Documents.Count
- for nF=1 to oXML.Batches(nB).Documents(nD).FormTypes.Count
- %>
- <option style="color: black; font-size: 11px; font-family: Arial, Helvetica, Geneva, Swiss, SunSans-Regular" value='<%="" & oXML.Batches(nB).BatchClassID & "-" & oXML.Batches(nB).Documents(nD).DocumentClassName & "-" & oXML.Batches(nB).Documents(nD).FormTypes(nF).FormTypeName%>' >
- <%=oXML.Batches(nB).BatchClassName & "-" & oXML.Batches(nB).Documents(nD).DocumentClassName & "-" & oXML.Batches(nB).Documents(nD).FormTypes(nF).FormTypeName%>
- </option>
- <%
- next
- next
- next
- set oXML=nothing
- %>
- </select>
- <input type="Hidden" name="FirstLoad" value="True">
- <input type="Hidden" name="PleaseText" value='<%=display(5)%>'>
- </form>
- </td>
- </tr>
- </table>
- </center>
-
-
- </body>
- </html>
-